package com.rzjm.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *   申请作业证
 * @author mr.zhou
 * @email zhouwei_nice@163.com
 * @date 2023-06-06 11:27:23
 */
@Data
@TableName("fire_work")
public class FireWork implements Serializable {
	private static final long serialVersionUID = 1L;

	//主键
	@TableId(type = IdType.AUTO)
	private Integer id;
	private Integer groupId;
	private Integer pianquId;
	private Integer userId;
	private Integer recordType;
	private String recordNo;
	private Integer regCompanyId;
	private String regCompanyName;
	private Integer workCompanyId;
	private String workCompanyName;
	private String regUserName;
	/**
	 * 动火作业级别 1 - 非生产  1 - 生产
	 */
	private Integer opLevel;
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date fireBeginTime;
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date fireEndTime;
	private Integer fireType;
	private Integer headerWxUserId;
	private Long headerSysUserId;
	private String recordHeaderUser;
	private Integer headerOpState;
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date headerOpTime;

	private String fireAddress;
	/**
	 *   状态  0 - 待审核   1 - 都处理完成  2 - 审核完成  3-已验收  4 - 驳回
	 */
	private Integer state;

	/**
	 *  作业内容
	 */
	private String workContent;

	/**
	 *  作业高度
	 */
	private String workHeight;


	/**
	 * 涉及其他的特殊作业
	 */
	private String otherSpecialWork;

	/**
	 * 风险辨识结果
	 */
	private String riskIdentifiResult;


	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
	private String workType;
	private String regCompanyOpinion;
	private String otherCompanyOpinion;
	private String produceDeptOpinion;
	private String safeManagerDeptOpinion;
	private String company_managerOpinion;
	private String remark;
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date finishTime;
	private Integer safeWxUseId;
	private Long safeSysUserId;
	private String safeUserName;
	private Integer safeOpState;

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date safeOpTime;

	/**
	 *
	 */
	private Integer lastCheckWxUserId;

	/**
	 *  最后审核人员id（生产经理审批）
	 */
	private Integer lastCheckSysUserId;
	private Integer lastCheckState;
	private Date lastCheckTime;
	private String lastCheckResult;


	/**
	 *  最后批准人员id(片区经理审批)
	 */
	private Integer lastSubmitSysUserId;
	private Integer lastSubmitWxUserId;
	private Date lastSubmitTime;
	private Integer lastSubmitState;
	private String lastSubmitResult;
	private String lastSubmitUserName;

	/**
	 *  完工验收人   安全员
	 */
	private Long checkAcceptSysUserId;
	private Integer checkAcceptWxUserId;
	private String checkAcceptSignImg;
	private Date checkAcceptTime;



	/**
	 *  申请人签字
	 */
	private String regSignImg;

	/**
	 *   责任人签字
	 */
	private String headerSignImg;
	/**
	 *   安全员签字
	 */
	private String safeSignImg;
	/**
	 *  最后审核人员签字
	 */
	private String checkSignImg;

	/**
	 *  最后批准人员签字
	 */
	private String submitSignImg;

	private Integer isUse;


	@TableField(exist = false)
	private List<FireWorkAnalysis> analyses;


	@TableField(exist = false)
	private List<FireWorkMeasures> measures;


	@TableField(exist = false)
	private List<FireWorkUser> workUsers;


	@TableField(exist = false)
	private List<FireWorkImg> imgList;

	@TableField(exist = false)
	private Integer isSafeUser;

	@TableField(exist = false)
	private Integer isHeaderUser;

	@TableField(exist = false)
	private Integer hourCount;

	@TableField(exist = false)
	private Integer signType;

	@TableField(exist = false)
	private Integer checkSignState;

	@TableField(exist = false)
	private Integer submitSignState;

	@TableField(exist = false)
	private Integer isCanRegDevice = 0;


	/**
	 *  是否已经焊机申请了
	 */
	@TableField(exist = false)
	private Integer isHasDeviceReg = 0;


	/**
	 *  是否已经归还
	 */
	@TableField(exist = false)
	private Integer isReback = 0;


	/**
	 *  是否是在申请时间内
	 */
	@TableField(exist = false)
	private Integer isInRegTime = 0;

	@TableField(exist = false)
	private String workTimes;


	@TableField(exist = false)
	private String nowDate;

	//小程序上使用  时 分
	@TableField(exist = false)
	private String beginTime;

	//小程序上使用  时 分
	@TableField(exist = false)
	private String deviceNum;
}
